
public class UserInfo{

	 private int answerCount;
	 private int acceptedAnsCount;
     private String DisplayName;
     
     public UserInfo(int answerCount, int acceptedAnsCount,String name){
    	 this.answerCount = answerCount;
    	 this.acceptedAnsCount = acceptedAnsCount;
    	 this.DisplayName = name;
     }
     
     public int getAnswerCount(){
    	 return this.answerCount;
     }
     
     public void updateAnswerCount(int newNumber){
    	 this.answerCount = newNumber;
     }
     
     public int getAcceptedAnsCount(){
    	 return this.acceptedAnsCount;
     }
     
     public void updateAcceptedAnsCount(int newNumber){
    	 this.acceptedAnsCount = newNumber;
     }
     
     public String getName(){
    	 return DisplayName;
     }
     
     public boolean equals(Object obj) {
	        if (obj == null) {
	            return false;
	        }
	        if (obj == this) {
	            return true;
	        }
	 
	        if (!(obj instanceof UserInfo)) {
	            return false;
	        }
	        
	        UserInfo obj1 = (UserInfo) obj;
	        if(obj1.getAcceptedAnsCount() != this.getAcceptedAnsCount()){
	        	return false;
	        }
	        if(obj1.getName() != this.getName()){
	        	return false;
	        }
	        if(obj1.getAnswerCount() != this.getAnswerCount()){
	        	return false;
	        }
	        
	        return true;
	    }
     
     
   
}
